package com.example.myapplication.presenter;

import android.widget.ImageView;
import android.widget.TextView;

import com.example.myapplication.model.MainModel;
import com.example.myapplication.view.MainView;

public class MainPresenter implements MainModel.MainCallBack, MainPresent {
    private MainView view;
    private MainModel model;

    public MainPresenter(MainView view) {
        this.view = view;
        model = new MainModel();
    }


    @Override
    public void success(TextView tv, int color, ImageView iv, int id) {
        view.setTabInfo(tv, color, iv, id);
    }

    @Override
    public void fail(String err) {

    }


    @Override
    public void setTabInfo(TextView tv, int color, ImageView iv, int id) {
        model.setTabInfo(tv, color, iv, id, this);
    }
}
